import request from '@/utils/request'

// 查询养生知识列表
export function listYangsheng(query) {
  return request({
    url: '/zhongyao/yangsheng/list',
    method: 'get',
    params: query
  })
}

// 查询养生知识详细
export function getYangsheng(yangKey) {
  return request({
    url: '/zhongyao/yangsheng/' + yangKey,
    method: 'get'
  })
}

// 新增养生知识
export function addYangsheng(data) {
  return request({
    url: '/zhongyao/yangsheng',
    method: 'post',
    data: data
  })
}

// 修改养生知识
export function updateYangsheng(data) {
  return request({
    url: '/zhongyao/yangsheng',
    method: 'put',
    data: data
  })
}

// 删除养生知识
export function delYangsheng(yangKey) {
  return request({
    url: '/zhongyao/yangsheng/' + yangKey,
    method: 'delete'
  })
}
